
// 每日刷题 7-10
// 

/*
 1.简单写词

 */



/**
 * 2.dd爱框框
 * 		双指针实现(滑动窗口)
 * 
 */
public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        
        int[] arr = new int[n];
        for(int i = 0; i < n; i++){
            arr[i] = scanner.nextInt();
        }
        
        int sum = 0;
        int l = 0;  
        int r = 0;  
        int len = n + 1;  // 区间长度
        int left = 0;     // 记录区间左端
        
        while (r < n) {
            
            // 右指针向右走
            while (sum < x && r < n) {
                sum += arr[r++];
            }
            
            while (sum >= x && l <= r) {
                // 修改区间
                if (r - l < len) {
                    len = r - l;
                    left = l + 1; 
                }
                sum -= arr[l++];
            }
        }
        System.out.println(left + " " + (left + len - 1));
        
    }

/**
 * 3.除2
 * 
 */


